from django.db import models
from django.utils import timezone
import django.utils.timezone as timezone


class gitlabModels(models.Model):
    id = models.AutoField(primary_key=True)
    gilabProject = models.CharField(max_length=30, verbose_name="gitlab项目名称")
    createTime = models.DateTimeField(
        default=timezone.now, verbose_name="创建时间")
    updateTime = models.DateTimeField(auto_now=True, verbose_name="更新时间")

class gitlabSchedulesModels(models.Model):
  id = models.AutoField(primary_key=True)
  schedules_description = models.CharField(max_length=30,verbose_name="描述")
  schedules_ref = models.CharField(max_length=30,verbose_name="分支")
  schedules_pipeline = models.CharField(max_length=30,verbose_name="pipeline id")
  schedules_next_run = models.CharField(max_length=30,verbose_name="下次运行时间")
  schedules_owner = models.CharField(max_length=30,verbose_name="创建用户")
  schedules_create_time = models.CharField(max_length=32,verbose_name="创建时间")
  schedules_update_time = models.CharField(max_length=30,verbose_name="更新时间")
  createTime = models.DateTimeField(
        default=timezone.now, verbose_name="创建时间")
  updateTime = models.DateTimeField(auto_now=True, verbose_name="更新时间")
  class Meta:
    db_table = 'schedulesModels'
    managed = True
    verbose_name = 'gitlab定时任务时间表'
    verbose_name_plural = verbose_name




